import unittest

from api.api_login import ApiLogin


class TestLogin(unittest.TestCase):
    # 1.初始化
    @classmethod
    def setUpClass(cls):
        # 获取ApiLogin对象
        cls.login = ApiLogin()

    # 2.登录
    def test01_login(self, mobile="13986143439", password="tt000000"):
        # 1.调用登录接口
        r = self.login.api_login(mobile, password)
        # 2.提取token
        print(r.json())
        # 3.断言


if __name__ == '__main__':
    unittest.main()
